package com.sohoo.nio.mima.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class DemoCoderFatory  implements ProtocolCodecFactory{
	private DemoEnCoder enCoder = new DemoEnCoder();
	private DemoDecoder  decoder = new DemoDecoder();
	public ProtocolEncoder getEncoder(IoSession session) throws Exception {
		return enCoder;
	}

	public ProtocolDecoder getDecoder(IoSession session) throws Exception {
		return decoder;
	}

}
